﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nb.Common.Domains.Models;

namespace Nb.Schedules.Libs.Domains
{
    public class ClassroomSchedule : NbEntity<ClassroomSchedule>
    {
        public ClassroomSchedule()
        {
            ClassroomScheduleItems = new List<ClassroomScheduleItem>();
        }

        public virtual Guid ClassroomId { get; set; }
        public virtual IList<ClassroomScheduleItem> ClassroomScheduleItems { get; set; }
        public virtual void AddItem(ClassroomScheduleItem item)
        {
            if (!ClassroomScheduleItems.Contains(item))
            {
                ClassroomScheduleItems.Add(item);
                //item.ClassroomSchedule = this;
            }
        }
        public virtual void RemoveItem(ClassroomScheduleItem item)
        {
            if (ClassroomScheduleItems.Contains(item))
            {
                ClassroomScheduleItems.Remove(item);
                //item.ClassroomSchedule = null;
            }
        }
    }

    public class ClassroomScheduleItem : NbEntity<ClassroomScheduleItem>
    {
        public virtual Guid ClassroomScheduleId { get; set; }
        //public virtual ClassroomSchedule ClassroomSchedule { get; set; }
        public virtual int SectionNumber { get; set; }
        public virtual string Title { get; set; }
        public virtual DateTime StartDate { get; set; }
        public virtual DateTime EndDate { get; set; }
    }
}
